package third;

import java.util.Scanner;

public class five_19 {
    public static void main(String[] args) {
        for(int i=1;i<=8;i++){
            for(int k=1;k<=7-i;k++){
                System.out.print("    ");
            }
            for(int j=1;j<=2*i-1;j++){
                if(j<=i)
                    System.out.printf("%4d",(int)(Math.pow(2,j-1)));
                else
                    System.out.printf("%4d",(int)(Math.pow(2,2*i-j-1)));

            }
            System.out.println();
        }

    }

}
